
Rz=6400e3;
Horb=19100e3;
Rorb=Rz+Horb;
t=0:1000:24*3600;
n=length(t);
for i=1:n
alpha=t(i)/24/3600*4*pi;
X(i)=cos(alpha)*Rorb;
Y(i)=sin(alpha)*Rorb;
Vsput=2*pi*Rorb/24/3600;
Vx(i)=Vsput*(-sin(alpha));
Vy(i)=Vsput*cos(alpha);
rv(i)=Rorb*cos(alpha)-Rz;
xsv(i)=X(i);
ysv(i)=Y(i)-Rz;
modrv(i)=sqrt(xsv(i)^2+ysv(i)^2);
if ysv(i) > Rz
    V(i)=(xsv(i)*Vx(i)+ysv(i)*Vy(i))/modrv(i);
else
    V(i) = nan;
end;
end
figure (1)
plot(t,X);
figure (2)
plot (t,Y);
figure (3)
plot(t,V);




